;asm_x86_kernel.asm - David Young
bits 32
;Kernel assembly functions
global _gdt_flush
extern _gp
;Loads gdt and sets data segments to the data descriptor (0x10 aka offset 16)
_gdt_flush:
	lgdt[_gp]
	mov ax, 0x10
	mov ds, ax
	mov es, ax
	mov fs, ax
	mov gs, ax
	mov ss, ax
	jmp 0x08:flush2	;Return from this function and set the CS register to offset 8
					;with a far jump.
flush2:
	ret